using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Entity;
using Data;

using Quadrem.ExceptionManagement;


namespace Business
{
    public class CommonBO
    {
        #region Metodos Publicos        
        public static Boolean ValidarNombre(Guid uidId, Int32 intUsuarioId, String strNombre, String strTipo)
        {
            Boolean isValid = false;
            try
            {
                isValid = CommonDA.ValidarNombre(uidId, intUsuarioId, strNombre, strTipo);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
            }
            return isValid;
        }

        public static DataTable ObtenerDepartamentos()
        {
            DataTable dtDepartamentos = null;
            try
            {
                dtDepartamentos = CommonDA.ObtenerDepartamentos();
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
            }
            return dtDepartamentos;
        }
        public static DataTable ObtenerProvincias(Guid uidDepartamentoId)
        {
            DataTable dtProvincias = null;
            try
            {
                dtProvincias = CommonDA.ObtenerProvincias(uidDepartamentoId);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
            }
            return dtProvincias;
        }
        public static DataTable ObtenerDistritos(Guid uidProvinciaId)
        {
            DataTable dtDistritos = null;
            try
            {
                dtDistritos = CommonDA.ObtenerDistritos(uidProvinciaId);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
            }
            return dtDistritos;
        }
        #endregion
    }
}
